// $Id: base.js,v 1.8 2008/05/29 19:44:50 merlinofchaos Exp $
/**
 * @file base.js
 *
 * Some basic behaviors for mewdkp ui and styles related functions.
 */


/**
 * AJAX player status toggling
 */
Drupal.behaviors.mewdkpStatus = function (context) {
	$('span.mewdkp-player-status a').click(function(){
			//Apply instant changes to link
			if ($(this).html() == 'Active'){
				$(this).html('Inactive');
				$(this).attr('class', 'inactive');
			} else {
				$(this).html('Active');
				$(this).attr('class', 'active');
			}
			$.get('/mewdkp/response/toggleplayer/'+$(this).attr('id'), function(data){
				console.log(data);
			});
			return false;
		}
	);
}

